<?php
/**
 * File: cmsmediafiles.php.
 * Author: caoqicheng@haibao.com
 * Editor: PhpStorm
 * Date: 17/2/7 上午10:45
 * Brief:
 */
namespace haibao\jiepai\model\data\media;

class CmsMediaFiles extends \haibao\jiepai\model\data\Base{
	
	/**
	 * 类型 1.音频，2.视频
	 */
	const TYPE_VOICE = 1;
	const TYPE_VIDEO = 2;
	
	/**
	 * 删除时置为-1，默认是0
	 * 是否是删除
	 */
	const FLAG_IS = 0;
	const FLAG_DEL = -1;
	
	public $Type;

	public $Title;
	
	public $Name;
	
	public $Singer;
	
	public $Album;

	public $Description;
	
	public $Cover;
	
	public $Size;
	
	public $Creator;
	
	public $CreateTime;
	
	public $CloseTime;
	
	public $CloseEditor;
	
	public $Flag;
	
	public $CoverUrl = '';
	
	public function __construct(){
		parent::__construct();
		$this->setColumnName('Id', 'MediaID');
		$this->intField('Type', 'Type');
		
		$this->stringField('Title', 'Title');
		$this->stringField('Name', 'Name');
		$this->stringField('Singer', 'Singer');
		$this->stringField('Album', 'Album');
		$this->stringField('Description', 'Description');
		
		$this->intField('Cover', 'Cover');
		$this->intField('Size', 'Size');
		$this->intField('Creator', 'Creator');
		$this->dateField('CreateTime', 'CreateTime');
		$this->dateField('CloseTime', 'CloseTime');
		$this->intField('CloseEditor', 'CloseEditor');
		$this->intField('Flag', 'Flag');
		
		$this->setTableName('cms_media_files');
	}
}